CREATE TABLE [dbo].[TDAMAR_NCPR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_NC__NU_SE__567ED357] DEFAULT ((0)),
[CO_TIDO_DEST] [dbo].[TD_VC_003] NULL,
[NU_DOCU_DEST] [dbo].[TD_VC_020] NULL,
[IM_PAGO_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_PA__5772F790] DEFAULT ((0)),
[IM_SALD_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__58671BC9] DEFAULT ((0)),
[IM_SALD_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__595B4002] DEFAULT ((0)),
[CO_TIDO_ORIG] [dbo].[TD_VC_003] NULL,
[NU_DOCU_ORIG] [dbo].[TD_VC_020] NULL,
[IM_PAGO_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_PA__5A4F643B] DEFAULT ((0)),
[IM_SALD_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__5B438874] DEFAULT ((0)),
[IM_SALD_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_SA__5C37ACAD] DEFAULT ((0)),
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDAMAR_NC__ST_CI__5D2BD0E6] DEFAULT ('N'),
[IM_PAGO_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_PA__5F141958] DEFAULT ((0)),
[IM_PAGO_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_NC__IM_PA__60083D91] DEFAULT ((0)),
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_NC__CO_US__60FC61CA] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_NC__FE_US__61F08603] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_NC__CO_US__62E4AA3C] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_NC__FE_US__63D8CE75] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_NCPR] WITH NOCHECK ADD CONSTRAINT [CK__TDAMAR_NC__ST_CI__5E1FF51F] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDAMAR_NCPR] ADD CONSTRAINT [PK__TDAMAR_N__F881476467F44373] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_NCPR] ADD CONSTRAINT [FK__TDAMAR_NCPR__24E8431A] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCAMAR_NCPR] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
